package com.ourteam.product.ui.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-14 15:15:40 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductUIFormFieldBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.ui.dao.ProductUIFormField productUIFormField;

  protected BeanMap getBeanMap() {

    return new BeanMap(productUIFormField);
  }

  static {
    mappedDaoFields.put("id", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.Id);

    mappedDaoFields.put("parentId", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.ParentId);

    mappedDaoFields.put("formId", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.FormId);

    mappedDaoFields.put("typeId", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.TypeId);

    mappedDaoFields.put("code", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.Code);

    mappedDaoFields.put("title", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.Title);

    mappedDaoFields.put("titleKey", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.TitleKey);

    mappedDaoFields.put("tipInfo", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.TipInfo);

    mappedDaoFields.put("readOnly", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.ReadOnly);

    mappedDaoFields.put("allowEmpty", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.AllowEmpty);

    mappedDaoFields.put("dataSource", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.DataSource);

    mappedDaoFields.put("style", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.Style);

    mappedDaoFields.put(
        "parameterValue", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.ParameterValue);

    mappedDaoFields.put("sortIndex", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.SortIndex);

    mappedDaoFields.put("status", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.Status);

    mappedDaoFields.put("remarks", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.Remarks);

    mappedDaoFields.put("typeWidget", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.TypeWidget);

    mappedDaoFields.put("typeName", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.TypeName);

    mappedDaoFields.put(
        "allowSubField", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.AllowSubField);

    mappedDaoFields.put("typeIcon", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.TypeIcon);

    mappedDaoFields.put(
        "modelPropertyId", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.ModelPropertyId);

    mappedDaoFields.put(
        "dataSourceCode", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.DataSourceCode);

    mappedDaoFields.put(
        "dataSourceName", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.DataSourceName);

    mappedDaoFields.put("fieldSpan", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.FieldSpan);

    mappedDaoFields.put(
        "fieldColumn", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.FieldColumn);

    mappedDaoFields.put(
        "remenberValue", com.ourteam.product.ui.dao.IProductUIFormFieldDAO.RemenberValue);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductUIFormFieldBean() {
    super();

    this.productUIFormField = new com.ourteam.product.ui.dao.ProductUIFormField();
  }

  public ProductUIFormFieldBean(com.ourteam.product.ui.dao.ProductUIFormField productUIFormField) {
    super();

    this.productUIFormField = productUIFormField;
  }

  public com.ourteam.product.ui.dao.ProductUIFormField convertToProductUIFormField() {
    return this.productUIFormField;
  }

  public com.ourteam.product.ui.dao.ProductUIFormField convertTo() {
    return this.productUIFormField;
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productUIFormField.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productUIFormField.setId(id);
  }

  /**
   * Get parentId
   *
   * @return long
   */
  public long getParentId() {
    return (long) this.productUIFormField.getParentId();
  }

  /**
   * Set parentId
   *
   * @parameter long
   */
  public void setParentId(long parentId) {

    this.productUIFormField.setParentId(parentId);
  }

  /**
   * Get formId
   *
   * @return long
   */
  public long getFormId() {
    return (long) this.productUIFormField.getFormId();
  }

  /**
   * Set formId
   *
   * @parameter long
   */
  public void setFormId(long formId) {

    this.productUIFormField.setFormId(formId);
  }

  /**
   * Get typeId
   *
   * @return long
   */
  public long getTypeId() {
    return (long) this.productUIFormField.getTypeId();
  }

  /**
   * Set typeId
   *
   * @parameter long
   */
  public void setTypeId(long typeId) {

    this.productUIFormField.setTypeId(typeId);
  }

  /**
   * Get code
   *
   * @return String
   */
  public String getCode() {
    return (String) this.productUIFormField.getCode();
  }

  /**
   * Set code
   *
   * @parameter String
   */
  public void setCode(String code) {

    this.productUIFormField.setCode(code);
  }

  /**
   * Get title
   *
   * @return String
   */
  public String getTitle() {
    return (String) this.productUIFormField.getTitle();
  }

  /**
   * Set title
   *
   * @parameter String
   */
  public void setTitle(String title) {

    this.productUIFormField.setTitle(title);
  }

  /**
   * Get titleKey
   *
   * @return String
   */
  public String getTitleKey() {
    return (String) this.productUIFormField.getTitleKey();
  }

  /**
   * Set titleKey
   *
   * @parameter String
   */
  public void setTitleKey(String titleKey) {

    this.productUIFormField.setTitleKey(titleKey);
  }

  /**
   * Get tipInfo
   *
   * @return String
   */
  public String getTipInfo() {
    return (String) this.productUIFormField.getTipInfo();
  }

  /**
   * Set tipInfo
   *
   * @parameter String
   */
  public void setTipInfo(String tipInfo) {

    this.productUIFormField.setTipInfo(tipInfo);
  }

  /**
   * Get readOnly
   *
   * @return String
   */
  public String getReadOnly() {
    return (String) this.productUIFormField.getReadOnly();
  }

  /**
   * Set readOnly
   *
   * @parameter String
   */
  public void setReadOnly(String readOnly) {

    this.productUIFormField.setReadOnly(readOnly);
  }

  /**
   * Get allowEmpty
   *
   * @return String
   */
  public String getAllowEmpty() {
    return (String) this.productUIFormField.getAllowEmpty();
  }

  /**
   * Set allowEmpty
   *
   * @parameter String
   */
  public void setAllowEmpty(String allowEmpty) {

    this.productUIFormField.setAllowEmpty(allowEmpty);
  }

  /**
   * Get dataSource
   *
   * @return String
   */
  public String getDataSource() {
    return (String) this.productUIFormField.getDataSource();
  }

  /**
   * Set dataSource
   *
   * @parameter String
   */
  public void setDataSource(String dataSource) {

    this.productUIFormField.setDataSource(dataSource);
  }

  /**
   * Get style
   *
   * @return String
   */
  public String getStyle() {
    return (String) this.productUIFormField.getStyle();
  }

  /**
   * Set style
   *
   * @parameter String
   */
  public void setStyle(String style) {

    this.productUIFormField.setStyle(style);
  }

  /**
   * Get parameterValue
   *
   * @return String
   */
  public String getParameterValue() {
    return (String) this.productUIFormField.getParameterValue();
  }

  /**
   * Set parameterValue
   *
   * @parameter String
   */
  public void setParameterValue(String parameterValue) {

    this.productUIFormField.setParameterValue(parameterValue);
  }

  /**
   * Get sortIndex
   *
   * @return int
   */
  public int getSortIndex() {
    return (int) this.productUIFormField.getSortIndex();
  }

  /**
   * Set sortIndex
   *
   * @parameter int
   */
  public void setSortIndex(int sortIndex) {

    this.productUIFormField.setSortIndex(sortIndex);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productUIFormField.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productUIFormField.setStatus(status);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productUIFormField.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productUIFormField.setRemarks(remarks);
  }

  /**
   * Get typeWidget
   *
   * @return String
   */
  public String getTypeWidget() {

    return (String) this.productUIFormField.getTypeWidget();
  }

  /**
   * Get typeName
   *
   * @return String
   */
  public String getTypeName() {

    return (String) this.productUIFormField.getTypeName();
  }

  /**
   * Get allowSubField
   *
   * @return String
   */
  public String getAllowSubField() {

    return (String) this.productUIFormField.getAllowSubField();
  }

  /**
   * Get typeIcon
   *
   * @return String
   */
  public String getTypeIcon() {

    return (String) this.productUIFormField.getTypeIcon();
  }

  /**
   * Get modelPropertyId
   *
   * @return long
   */
  public long getModelPropertyId() {
    return (long) this.productUIFormField.getModelPropertyId();
  }

  /**
   * Set modelPropertyId
   *
   * @parameter long
   */
  public void setModelPropertyId(long modelPropertyId) {

    this.productUIFormField.setModelPropertyId(modelPropertyId);
  }

  /**
   * Get dataSourceCode
   *
   * @return String
   */
  public String getDataSourceCode() {

    return (String) this.productUIFormField.getDataSourceCode();
  }

  /**
   * Get dataSourceName
   *
   * @return String
   */
  public String getDataSourceName() {

    return (String) this.productUIFormField.getDataSourceName();
  }

  /**
   * Get fieldSpan
   *
   * @return String
   */
  public String getFieldSpan() {
    return (String) this.productUIFormField.getFieldSpan();
  }

  /**
   * Set fieldSpan
   *
   * @parameter String
   */
  public void setFieldSpan(String fieldSpan) {

    this.productUIFormField.setFieldSpan(fieldSpan);
  }

  /**
   * Get fieldColumn
   *
   * @return String
   */
  public String getFieldColumn() {
    return (String) this.productUIFormField.getFieldColumn();
  }

  /**
   * Set fieldColumn
   *
   * @parameter String
   */
  public void setFieldColumn(String fieldColumn) {

    this.productUIFormField.setFieldColumn(fieldColumn);
  }

  /**
   * Get remenberValue
   *
   * @return String
   */
  public String getRemenberValue() {
    return (String) this.productUIFormField.getRemenberValue();
  }

  /**
   * Set remenberValue
   *
   * @parameter String
   */
  public void setRemenberValue(String remenberValue) {

    this.productUIFormField.setRemenberValue(remenberValue);
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductUIFormFieldBean) == false) {
      return false;
    } // end if

    ProductUIFormFieldBean other = (ProductUIFormFieldBean) obj;

    boolean isEqual = false;

    com.ourteam.product.ui.dao.ProductUIFormField tempProductUIFormField =
        other.convertToProductUIFormField();

    if (tempProductUIFormField == null || this.productUIFormField == null) {
      isEqual = false;
    } else if (tempProductUIFormField == this.productUIFormField
        || tempProductUIFormField.equals(this.productUIFormField)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductUIFormFieldBean[] toArray(
      com.ourteam.product.ui.dao.ProductUIFormField[] aProductUIFormFields) {

    return toArray(aProductUIFormFields, null);
  }

  public static ProductUIFormFieldBean[] toArray(
      com.ourteam.product.ui.dao.ProductUIFormField[] aProductUIFormFields,
      IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductUIFormFields)) {
      return new ProductUIFormFieldBean[0];
    }

    int length = aProductUIFormFields.length;

    ProductUIFormFieldBean[] beans = new ProductUIFormFieldBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductUIFormFieldBean(aProductUIFormFields[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductUIFormFields[i]});
      }
    }

    return beans;
  }
}
